Many technologies for tracking a moving object using a time-series image shot by a CMOS camera or the like are proposed.
In a tracking of an object, it is important to obtain a region in a certain image which corresponds to a region where the object is present (hereinafter, referred to as an “object region”) in a next image accurately in a time-series image. As one of most general methods to obtain the corresponding object region, a template matching is exemplified.
In the template matching, an image in the object region detected in a certain image, or an image obtained by applying a predetermined processing is stored as a template image, and in a subsequent image, a region which is most similar to the template image is calculated by a predetermined method such as SAD, and the calculated region is determined as the object region.
When an appearance of the object to be tracked is not changed in a shot image, there exists a region which matches the template image completely in the subsequent image, a region where the object actually exists is accurately calculated by this method. However, in general, the appearance of the object in the shot image changes gradually due to factors such as a rotation of the object, a change in shape, and a change of a distance from a shooting apparatus. Therefore, the calculated object region does not necessarily match the region where the object actually exists. Therefore, in order to calculate the object region accurately by the template matching, it is important to reduce the difference between the template image and an appearance of the object to be tracked on the image to be processed.
In general, since the difference between the template image and the image in the object region increases with time since the template image is stored, it is preferable to set the difference between a time when the template image is stored and a time when the image to be processed is shot to a small value. Therefore, updating the template image on the basis of the image in the object region detected on the image to be processed is contemplated. However, there arises a problem of generation of displacement between the region to be stored as the template image and the region where the object actually exists due to an accumulation of errors of the object region generated by the change in appearance of the object in the shot image.
Therefore, in “The Template update Problem” I. Matthews, et al., IEEE Trans., Pattern Analysis and Machine Intelligence, Vol. 26, No. 6, June 2004, the displacement of the regions stored as the template images is reduced by storing an image in an object region as an initial template image when starting tracking an object, and verifying the template image by using a result of the template matching using the initial template image when updating the template image to correct the template image.
In contrast, in recent years, as shown in USP No. 2002/0102024, many object detecting apparatuses configured to detect an object stably even with an individual difference of the object or variations in background of the object or illuminating conditions are disclosed. By detecting an object in an image using these object detecting apparatuses and detecting a certain range in a next image considering an object detecting position, an object moving velocity, and so on, the object can be tracked even when an appearance of an object in an image changes as long as it is within a range to be detected of the object detecting apparatus.
However, in the technology disclosed in I. Matthews, et al., since an image when the tracking has started is used for verifying whether the image stored as the template image is actually the object to be tracked or not, the verification of the template image cannot be performed adequately when the appearance of the object on the shot image is significantly different from the time when the tracking has started, whereby there arises such a problem that the tracking of the object is difficult.
Also, in the tracking by the object detecting apparatus, although the tracking is achieved when the change in appearance of the object to be tracked is within the detecting range of the object detecting apparatus, the region to be detected varies significantly depending on the appearance of the object, a background, or the illuminating conditions, whereby there arises a problem that a positional accuracy of the detected object region is lower than the template matching.